package network.message;

public class Message implements IMessage 
{
	private MessageType type;
	private Object arguements;
	
	public Message(MessageType type, Object arguement)
	{
		this.type = type;
		this.arguements = arguement;
	}
	
	@Override
	public MessageType getMessageType()
	{
		return type;
	}

	@Override
	public Object getArguements() {
		return arguements;
	}

	@Override
	public void print() {
		if (arguements != null) {
			System.out.println(type.toString() + " with arguments " + arguements.toString());
		}
		else {
			System.out.println(type.toString());
		}
	}
}